-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
create strong_password_detection.py #10885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
def strong_password_detection(password): | ||
AllowedSymbols = ["#", "@", "$", "_", "*", "-"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We require type hints and doctests... Please add tests to cover all the cases below.
def strong_password_detection(password): | |
AllowedSymbols = ["#", "@", "$", "_", "*", "-"] | |
def strong_password_detection(password: str) -> bool: | |
""" | |
>>> strong_password_detection("str0ng@Password") | |
True | |
>>> strong_password_detection("str0ngPassword") | |
False | |
""" | |
allowed_symbols = {c for c in "#@$_*-"} |
@@ -0,0 +1,42 @@ | |||
def strong_password_detection(password): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the filename to strings/strong_password_detection.py
import re def strong_password_detection(password): Example usage:password = "StrongP@ss123!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plagiarized. From a cursory GitHub search, it appears that this code was ultimately taken from https://github.com/HarshCasper/Rotten-Scripts
Describe your change:
Checklist: